package com.stylefeng.guns.modular.system.dao;

import com.stylefeng.guns.modular.system.model.BorrowingInfo;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author stylefeng123
 * @since 2018-07-04
 */
public interface BorrowingInfoMapper extends BaseMapper<BorrowingInfo> {

    /**
     * 按条件检索
     * @param platform
     * @param type
     * @param revDate
     * @return
     */
    List<BorrowingInfo> search(@Param("platform")String platform, @Param("type")Integer type, @Param("revDate")Date revDate);


    /**
     * 查询最后一条数据
     * @param platform
     * @return
     */
    BorrowingInfo searchLast(@Param("platform")String platform);



    void updateBalance(@Param("platform")String platform,@Param("id")int id,@Param("difference")double difference);

}
